{% extends '_base.html' %}
{% block content %}
<div style="width: 90%; margin-left: 400px">
    <br>
    <h2>私密，笔记本</h2>
    <br>
    <br>
    <h4> {{ notes|length }} 条笔记 ： </h4>
    <form action="{{ url_for('new_note') }}"><input type="submit" value="添加" class="btn btn-primary"></form> <br>

    <br>
    <div class="note">
        {% for note in notes: %}
            {{ note.body }}
            <br>
            <br>
            <form method="get" style="float:left" action="{{ url_for('update_note', note_id=note.id) }}">
                {{ updateSubmit.crsf_token  }}
                {{ updateSubmit.submit(class='btn btn-dark') }}
            </form>

            <form method="post" style="margin-left:75px" action="{{ url_for('delete_note', note_id=note.id) }}">
                {{ deleteSubmit.crsf_token }}
                {{ deleteSubmit.submit(class='btn btn-danger') }}
            </form>
            <hr>
        {% endfor %}
    </div>

</div>

{% endblock %}